<template>
    <div class="big-box">
        <div class="header">
            <img src="../../../../../assets/bigScreen/header4.png" alt="" />
            <div class="backBox" @click="goBack"></div>
        </div>
        <div class="backToBox">
            <div class="backTo" @click="gotoHome">
                <div>返回总窗口</div>
            </div>
            <div class="backTo" @click="backToOne">
                <div>返回上一页</div>
            </div>
        </div>
        <div class="centerBox">
            <div class="sreenTitle">投资人</div>
            <div class="center">

                <div class="broker-container">
                    <div class="broker-item" v-for="(item,index) in investorList" :key="index"
                        @click="gotoPath('/bigScreen/brokerPersonDetail',{id:item.id})">
                        <div class="broker-img">
                            <img :src="baseUrl+item.image" alt="">
                        </div>
                        <div class="broker-name">{{item.name}}</div>
                        <div class="broker-text two-lines">
                            <div class="broker-text-item">
                                <!-- <img src="../../../assets/broker-phone.png" alt="" /> -->
                                <span class="two-lines">{{item.introduction}}</span>
                            </div>
                            <!-- <div class="broker-text-item">
            <img src="../../../assets/broker-map.png" alt="" style="margin-bottom: 2rem"/>
            <span>内蒙古助创基金管理有限公司</span>
          </div> -->
                        </div>
                        <div class="broker-btn">查看详情</div>
                    </div>
                    <no-data v-if="!investorList.length" />
                    <div class="pagination-box">
                        <a-pagination :showSizeChanger='false' v-model:current="pages.number" v-model:pageSize="pages.size" :total="pages.total"
                            @change="onShowSizeChange" />
                    </div>

                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import headerBox from "../../../../../components/header.vue"
import headerImg from "../../../../../components/headerImg.vue"
import footerBox from "../../../../../components/footer-box.vue"
import { getInvestor } from "../../../../../api/capital"
import { ref, reactive, onBeforeMount } from "vue"
import { useRouter, useRoute } from "vue-router"
import { baseUrl } from '../../../../../../config'
import noData from "../../../no-data.vue"
const router = useRouter()
const route = useRoute()
function setType(index, type) {
    typeIds.value[index] = type
}
const pages = reactive({
    number: 1, //第几页
    size: 10, //每页中显示数据的条数
    total: 0
})
const investorList = ref({})
async function getInvestorList() {
    getInvestor(pages).then((response) => {
        console.log(response);
        if (response.code == 200) {
            investorList.value = response.data.list
            pages.total = response.data.total
            //     store.setToken(response.data.token)
            //     message.success("登录成功！")
            //     router.push("/home")
        } else {
            // handleGetCode()
        }
    })
}
const onShowSizeChange = (current, pageSize) => {
    pages.number = current
    pages.size = pageSize
    getInvestorList()
};
const gotoPath = (path, data) => {
    router.push({ path: path, query: data })
}
const gotoHome = (act) => {
    router.push({
        path: '/bigScreenIndex',
    })
}
const backToOne = (act) => {
    router.go(-1)
}

const goBack = () => {
    router.push('/chart')
}
onBeforeMount(() => {
    getInvestorList()
})
const current = ref(6)
const tabIndex = ref(1)
const typeIds = ref([null, null, null, null, null, null, null, null, null])
const typeList = ref([
    {
        title: "投资阶段",
        showMore: false,
        list: [
            {
                name: "不限",
                id: 1,
            },
            {
                name: "种子期",
                id: 2,
            },
            {
                name: "初创期",
                id: 3,
            },
            {
                name: "扩张期",
                id: 3,
            },
            {
                name: "成熟期",
                id: 3,
            },
        ],
    },
    {
        title: "投资性质",
        showMore: false,
        list: [
            {
                name: "不限",
                id: 1,
            },
            {
                name: "VC",
                id: 2,
            },
            {
                name: "FOCs",
                id: 3,
            },
            {
                name: "天使投资人",
                id: 4,
            },
            {
                name: "券商直投",
                id: 5,
            },
            {
                name: "VCPE",
                id: 6,
            },
            {
                name: "战略投资者",
                id: 7,
            },
            {
                name: "PE",
                id: 8,
            },
        ],
    },
    {
        title: "所在地区",
        showMore: false,
        list: [
            {
                name: "呼和浩特市",
                id: 1,
            },
            {
                name: "赤峰市",
                id: 2,
            },
            {
                name: "通辽市",
                id: 3,
            },
            {
                name: "包头市",
                id: 4,
            },
            {
                name: "鄂尔多斯市",
                id: 5,
            },
            {
                name: "乌兰察布市",
                id: 6,
            },
            {
                name: "二连浩特市",
                id: 7,
            },
        ],
    },
])
</script>

<style scoped lang="scss">
@font-face {
    font-family: "ffa";
    src: url(../../../assets/bigScreen/fonts/DS-DIGIB.TTF);
}
ul,
li {
    list-style: none;
}
.big-box {
    background-color: #071c3b;
    height: 100vh;
}
.header {
    position: relative;
    text-align: center;
    position: relative;
    height: 19.1rem;

    .backBox {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 70rem;
        height: 10rem;
        cursor: pointer;
    }

    > img {
        width: 100%;
        max-height: 100%;
        margin-top: -1.1rem;
        image-rendering: -moz-crisp-edges; /* Firefox */
        image-rendering: -o-crisp-edges; /* Opera */
        image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */
        image-rendering: crisp-edges;
        -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
    }
}
.centerBox {
    width: 96%;
    margin: 0 auto;
    position: absolute;
    top: 14rem;
    left: 2%;
    .sreenTitle {
        background-image: url("../../../../../assets/bigScreen/sreenTitle.png");
        background-size: 100% 100%;
        height: 3.8rem;
        padding-left: 35px;
        font-weight: 600;
        color: #fff;
        display: flex;
        align-items: center;
    }
    .center {
        margin-top: 1rem;
        height: calc(100vh - 20rem);
        border: 1px solid;
        border-image: linear-gradient(
                130deg,
                #2385df 0%,
                rgba(35, 133, 223, 0.65) 92%
            )
            1;
        overflow-y: scroll;
        padding: 20px;

        .broker-container {
            width: 136rem;
            height: max-content;
            margin: 3rem auto;
            display: flex;
            flex-wrap: wrap;
            .broker-item {
                width: 25.6rem;
                height: 36.4rem;
                margin-right: 2rem;
                margin-bottom: 2rem;
                background-color: #082853;
                padding: 2rem;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                border: 1px solid #4494ff46;

                // box-shadow: 0px 4px 20px 0px rgba(231, 237, 247, 0.7);
                &:nth-child(5n + 5) {
                    margin-right: 0;
                }
                .broker-img {
                    width: 14rem;
                    height: 14rem;
                    margin-bottom: 1.5rem;
                    img {
                        width: 100%;
                        height: 100%;
                        border-radius: 50%;
                        object-fit: cover;
                    }
                }
                .broker-name {
                    font-size: 2rem;
                    font-weight: bold;
                    color: #fff;
                }
                .broker-text {
                    margin-top: 1.5rem;
                    margin-bottom: 2rem;
                    font-size: 1.5rem;
                    line-height: 2.5rem;
                    height: 5rem;
                    color: #fff;
                    .broker-text-item {
                        display: flex;
                        align-items: center;
                        img {
                            width: 1.5rem;
                            height: auto;
                            margin-right: 0.5rem;
                        }
                    }
                }
                .broker-btn {
                    width: 100%;
                    line-height: 3.4rem;
                    border-radius: 4px;
                    background: #037dff;
                    text-align: center;
                    background-color: #037aff;
                    font-size: 1.6rem;
                    font-weight: bold;
                    color: #ffffff;
                    cursor: pointer;
                }
                &:last-child {
                    margin-right: 0;
                }
            }
        }
        .pagination-box {
            width: 100%;
            height: 10rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }
    ::-webkit-scrollbar {
        width: 5px;
        height: 10px;
    }

    /* 滚动条轨道 */
    ::-webkit-scrollbar-track {
        background-color: #234470;
    }

    /* 滚动条滑块 */
    ::-webkit-scrollbar-thumb {
        background-color: #061c57;
    }

    /* 鼠标悬停在滚动条上的滑块 */
    ::-webkit-scrollbar-thumb:hover {
        background-color: #555;
    }
}
.backToBox {
    position: absolute;
    top: 8rem;
    right: 2%;
    display: flex;
    .backTo {
        background-image: url("../../../../../assets/bigScreen/backTo.png");
        color: #2dccff;
        background-size: 100% 100%;
        width: fit-content;
        padding: 2px 40px 10px 10px;
        font-weight: 600;
        cursor: pointer;
        margin-left: 10px;
        div {
            padding-top: 5px;
        }
    }
}::v-deep {
    .ant-btn-primary {
        border-color: #037aff;
        background: #037aff;
    }

    .ant-input {
        background: rgba(68, 148, 255, 0.12);
        border: none;
        color: #ffffff;
    }

    .ant-pagination-item {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
    }

    .ant-pagination-item a {
        color: #ffffff;
    }

    .ant-pagination-prev .ant-pagination-item-link,
    .ant-pagination-next .ant-pagination-item-link {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
        color: #707981;
    }

    .ant-pagination-disabled .ant-pagination-item-link {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
        color: #707981;
    }

    .ant-pagination-item-active {
        background: #004dfd;
        border-radius: 2px;
        border: none;
    }

    .ant-pagination-jump-prev
        .ant-pagination-item-container
        .ant-pagination-item-ellipsis,
    .ant-pagination-jump-next
        .ant-pagination-item-container
        .ant-pagination-item-ellipsis {
        color: #ffffff;
    }
    .ant-select-selector {
        background-color: transparent !important;
        background: rgba(8, 26, 48, 0.8) !important;
        border: 1px solid #0b2f5f !important;
        color: #ffffff !important;
    }
}
</style>
